package com.magicborrow.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.magicborrow.fragment.SearchResultFilterFragment;

import java.util.ArrayList;

/**
 * Created by River on 7/24/15.
 */
public class ListFragmentAdapter extends FragmentPagerAdapter{

    ArrayList<Fragment> fragments;

    public void setData(ArrayList<Fragment> fragments){
        this.fragments = fragments;
    }

    public ListFragmentAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return fragments.get(position);
    }

    @Override
    public int getCount() {
        return fragments.size();
    }
}
